<?php

namespace Modules\Admin\Http\Controllers\WorkMessage;

use Modules\Common\Models\WorkMessage;
use Modules\Common\Util\Api;


class Update 
{


    /**
     *@Route(path=/api/admin/work-message  method=put)
    */
    public function index()
    {
        WorkMessage::safeUpdateWithRequestParams(['note']);
        return Api::success();
    }


    /**
     *@Route(path=/api/admin/work-message-finish  method=put)
     */
    public function finish()
    {
        request()->merge(['status' => 2]);
        WorkMessage::safeUpdateWithRequestParams(['status']);
        return Api::success();
    }
}
